home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicComboPopup$InvocationKeyHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.1 KB  |  29 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.KeyAdapter;
  4. import java.awt.event.KeyEvent;
  5.  
  6. public class BasicComboPopup$InvocationKeyHandler extends KeyAdapter {
  7.    // $FF: synthetic field
  8.    private final BasicComboPopup this$0;
  9.  
  10.    public BasicComboPopup$InvocationKeyHandler(BasicComboPopup var1) {
  11.       this.this$0 = var1;
  12.    }
  13.  
  14.    public void keyReleased(KeyEvent var1) {
  15.       if (var1.getKeyCode() == 32 || var1.getKeyCode() == 10) {
  16.          if (this.this$0.isVisible()) {
  17.             if (BasicComboPopup.access$0(this.this$0)) {
  18.                this.this$0.comboBox.setSelectedIndex(this.this$0.list.getSelectedIndex());
  19.             }
  20.  
  21.             this.this$0.togglePopup();
  22.          } else if (var1.getKeyCode() == 32) {
  23.             this.this$0.togglePopup();
  24.          }
  25.       }
  26.  
  27.    }
  28. }
  29.